package com.shop.feign;

import com.shop.bean.Shop;
import com.shop.feign.factory.ShopFeignFactory;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import shopBean.common.Enum.StatusAll;
import shopBean.common.bean.RestResult;

@FeignClient(value="service-shop",fallbackFactory=ShopFeignFactory.class)
public interface ShopFeign {
	@RequestMapping("/shop/insert.api")
	public RestResult insert(@RequestBody Shop shop);

	@RequestMapping("/shop/getShopById.api")
	public RestResult<Shop> getShopById(@RequestParam(value = "id",required = true) String id);

	@RequestMapping("/shop/updateStatusById.api")
	public RestResult<Shop> updateStatusById(@RequestParam(value = "id", required = true) String id, @RequestParam(value = "status", required = true) StatusAll status);

}
